package com.dxa.models;

import android.util.Log;

public class applog {
	
	public static String appName = "88models : "; 
	private static boolean DEBUGLOG = true;

	public static void v(String Msg) {
		if(!DEBUGLOG) return;
		
		Log.v(appName,new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}
	public static void v(String Tag, String Msg) {
		if(!DEBUGLOG) return;
		
		Log.v(Tag, appName+new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}

	public static void d(String Msg) {
		if(!DEBUGLOG) return;
		
		Log.d(appName,new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}
	public static void d(String Tag, String Msg) {
		if(!DEBUGLOG) return;
		
		Log.d(Tag, appName+new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}

	public static void i(String Msg) {
		if(!DEBUGLOG) return;
		
		Log.i(appName,new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}
	public static void i(String Tag, String Msg) {
		if(!DEBUGLOG) return;
		
		Log.i(Tag, appName+new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}

	public static void w(String Msg) {
		if(!DEBUGLOG) return;
		
		Log.w(appName,new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}
	public static void w(String Tag, String Msg) {
		if(!DEBUGLOG) return;
		
		Log.w(Tag, appName+new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}

	public static void w(String Tag, String Msg, Throwable tr) {
		if(!DEBUGLOG) return;
		
		Log.w(Tag, appName+new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg, tr);
	}

	public static void e(String Msg){
		if(!DEBUGLOG) return;
		
		Log.e(appName,new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}
	public static void e(String Tag, String Msg) {
		if(!DEBUGLOG) return;
		
		Log.e(Tag, appName+new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg);
	}
	public static void e(String Tag, String Msg, Throwable tr) {
		if(!DEBUGLOG) return;
		
		Log.e(Tag, appName+new Throwable().getStackTrace()[1].getFileName()
				+"["+new Throwable().getStackTrace()[1].getLineNumber() + "] : "
				+Msg, tr);
	
	}

	public static void d_ext(String Tag) {
		if(!DEBUGLOG) return;

		Log.d(Tag, new Throwable().getStackTrace()[1].getFileName()
					+"("+new Throwable().getStackTrace()[1].getLineNumber()+")"
					+"-"+new Throwable().getStackTrace()[1].getMethodName()+"()");
	}

	public static void d_ext(String Tag, String Msg) {
		if(!DEBUGLOG) return;

		Log.d(Tag, new Throwable().getStackTrace()[1].getFileName()
					+"("+new Throwable().getStackTrace()[1].getLineNumber()+")"
					+"-"+new Throwable().getStackTrace()[1].getMethodName()+"()"
					+" : "+Msg);
	}
	
}
